package cn.jlonely.xyhx.admin.mapper;

import cn.jlonely.xyhx.pojo.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminMapper {

    @Select("select adminId,name,username,email,phoneNumber,avatarUrl,create_time,update_time from admins where username=#{username} and password=#{password} ")
    @Results({
            @Result(property = "id", column = "adminId")
    })
    Admin selectByUsernameAndPassword(Admin admin);

    void updateAdminInfo(Admin admin);
}